/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.view.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import simplemetrosystem.view.InformationPane;
import simplemetrosystem.view.table.Exceptions.InformationPanelException;

/**
 *
 * @author Eric Qian
 */
public class CloseTabActionListener implements ActionListener {

    public CloseTabActionListener(InformationPane infPane) {
        this.infPane = infPane;
    }

    public void actionPerformed(ActionEvent e) {
        infPane.setHighLight(null,false);
        infPane.removeExTab();
        infPane.setElemTab(InformationPane.ALL_LINE);
        try {
            infPane.setFocus(InformationPane.ALL_LINE, null);
        } catch (InformationPanelException ex) {
            ex.printStackTrace();
        }
    }
    private InformationPane infPane;
}
